﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AdaptiveAgents
{
    class GameRecord
    {
        private List<Record> m_lDataBase;
        private Record m_rFinalRecord;

        public GameRecord()
        {
            m_lDataBase = new List<Record>();
        }

        public void addRecord(Record rec)
        {
            m_lDataBase.Add(rec);
        }

        public Record getRecord(int index)
        {
            return m_lDataBase[index];
        }

        public void calculateAverageOfRecord(int index)
        {
            if (m_lDataBase.Count == 1)
            {
                m_rFinalRecord = m_lDataBase[0];
            }
            else
            {
                //TODO NEXT  
            }
        }

        public Record getAverageRecord()
        {
            return m_rFinalRecord;
        }

        public int length()
        {
            return m_lDataBase.Count;
        }

        public void clear()
        {
            m_lDataBase.Clear();
            m_rFinalRecord = null;
        }

    }
}
